Skip to content

fix(serve): replace catch unreachable with try in tri_serve.zig init#158

Merged
gHashTag merged 1 commit into
mainfrom
feat/issue-156
Mar 11, 2026
Merged

fix(serve): replace catch unreachable with try in tri_serve.zig init#158
gHashTag merged 1 commit into
mainfrom
feat/issue-156

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

  • Changed ServerStatus.init return type from ServerStatus to !ServerStatus
  • Replaced catch unreachable with try to properly propagate allocation failures
  • Updated all call sites to use try

Changes

src/tri/tri_serve.zig:

  • Line 91: init() now returns !ServerStatus
  • Line 92-97: Simplified to use try protocols instead of nested catch blocks
  • Line 120: Updated call site in UnifiedApiServer.init to use try
  • Line 1049: Updated test to use try

Test Plan

  • zig ast-check src/tri/tri_serve.zig passes
  • zig fmt src/tri/tri_serve.zig passes
  • No catch unreachable on ArrayList init

Closes #156

🤖 Generated with Claude Code

ServerStatus.init now returns !ServerStatus instead of ServerStatus,
properly propagating allocation failures instead of using catch unreachable.
Also updated all call sites to use try.

Closes #156

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gHashTag gHashTag merged commit 4688968 into main Mar 11, 2026
5 of 6 checks passed
gHashTag pushed a commit that referenced this pull request Mar 18, 2026
- Loop #158 in progress
- Call count: 4
- Branch: vibee-v10-tri-economy (66 commits ahead of main)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Mar 18, 2026
fix(serve): replace catch unreachable with try in tri_serve.zig init
@gHashTag gHashTag deleted the feat/issue-156 branch April 3, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(serve): replace catch unreachable with try in tri_serve.zig init

1 participant